import { IsNotEmpty } from 'class-validator';
import { IsExistsRule } from '../../common/rules/is-exists.rule';

export class RegisterDto {
  @IsNotEmpty({ message: '用户名不能为空！' })
  @IsExistsRule('user', { message: '用户名已存在！' })
  username: string;
  @IsNotEmpty({ message: '密码不能为空！' })
  password: string;
  @IsNotEmpty({ message: '确认密码不能为空' })
  password_confirm: string;
  avatar?: string;
}
